﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true"
    CodeBehind="wFrmRegistroMetasActualizar.aspx.cs" Inherits="Crosland.Automotriz.Web.Repuestos.wFrmRegistroMetasActualizar" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
    <script type="text/javascript">


        function pageLoad() {

            var control = document.getElementById('ctl00_cphMain_hfIndicador');
            cambiarImagenHeader();

            if (control.value == 'S') {
                $find('<%= ((AjaxControlToolkit.CollapsiblePanelExtender)this.Master.FindControl("cpeMenuGeneral")).BehaviorID %>')._doClose();

                control.value = 'N';
            }


        }

                

                
               

    </script>

    <script language="javascript"  type="text/javascript" >
        function ValidNum() {
            if (event.keyCode < 48 || event.keyCode > 57) {
                event.returnValue = false;
            }
        }
</script>
    <div class="main-header" style="width: 100%">
        <div class="main-titulo" style="width: 87%;">
            Mantenimiento
            <dx:ASPxLabel ID="lbltitulo" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="Medium">
            </dx:ASPxLabel>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <dx:ASPxLabel ID="lblMeta" runat="server" Font-Bold="True" Font-Names="Arial" Font-Size="Medium">
            </dx:ASPxLabel>
        </div>
    </div>
    <div class="content-form">
        <asp:HiddenField ID="hfIndicador" runat="server" Value="S" />
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <table>
                    <tr>
                        <td>
                            <dx:ASPxButton ID="btnNuevo" runat="server" Text="Nuevo" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Width="100px" OnClick="btnNuevo_Click">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnEliminar" runat="server" Text="Eliminar" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                OnClick="btnEliminar_Click" Width="100px">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnSalir" runat="server" Text="Salir" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Width="100px" AutoPostBack="False" OnClick="btnSalir_Click">
                            </dx:ASPxButton>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                </table>
                <dx:ASPxRoundPanel ID="RPFiltrar" runat="server" Width="70%" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                    CssPostfix="Office2010Blue" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px"
                    GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                    <HeaderStyle>
                        <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                    </HeaderStyle>
                    <PanelCollection>
                        <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                            <table>
                                <tr>
                                    <td>
                                        Año:
                                    </td>
                                    <td>
                                        <dx:ASPxComboBox ID="cboAnio" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                            CssPostfix="Office2010Blue" SelectedIndex="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                            Width="100px">
                                            <Items>
                                                <dx:ListEditItem Selected="True" Text="2010" Value="2010" />
                                                <dx:ListEditItem Text="2011" Value="2011" />
                                                <dx:ListEditItem Text="2012" Value="2012" />
                                                <dx:ListEditItem Text="2013" Value="2013" />
                                                <dx:ListEditItem Text="2014" Value="2014" />
                                            </Items>
                                            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                            </LoadingPanelImage>
                                            <LoadingPanelStyle ImageSpacing="5px">
                                            </LoadingPanelStyle>
                                        </dx:ASPxComboBox>
                                    </td>
                                    <td>
                                    </td>
                                    <td>
                                        Mes:
                                    </td>
                                    <td>
                                        <dx:ASPxComboBox ID="cboMes" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                            CssPostfix="Office2010Blue" SelectedIndex="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                            Width="200px">
                                            <Items>
                                                <dx:ListEditItem Selected="True" Text="Enero" Value="01" />
                                                <dx:ListEditItem Text="Febrero" Value="02" />
                                                <dx:ListEditItem Text="Marzo" Value="03" />
                                                <dx:ListEditItem Text="Abril" Value="04" />
                                                <dx:ListEditItem Text="Mayo" Value="05" />
                                                <dx:ListEditItem Text="Junio" Value="06" />
                                                <dx:ListEditItem Text="Julio" Value="07" />
                                                <dx:ListEditItem Text="Agosto" Value="08" />
                                                <dx:ListEditItem Text="Septiembre" Value="09" />
                                                <dx:ListEditItem Text="Octubre" Value="10" />
                                                <dx:ListEditItem Text="Noviembre" Value="11" />
                                                <dx:ListEditItem Text="Diciembre" Value="12" />
                                            </Items>
                                            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                            </LoadingPanelImage>
                                            <LoadingPanelStyle ImageSpacing="5px">
                                            </LoadingPanelStyle>
                                        </dx:ASPxComboBox>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="btnfiltrar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                            CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                            Text="Filtrar" Width="100px" OnClick="btnfiltrar_Click">
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>
                <dx:ASPxRoundPanel ID="RPMetasVendedor" runat="server" ClientInstanceName="RPMetasVendedor"
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                    GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                    Width="70%" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" 
                    ClientVisible="False">
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                    <HeaderStyle>
                        <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                    </HeaderStyle>
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxGridView ID="grdVendedor" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" KeyFieldName="ID_UBIC_VEND_CAB;ID_VENDEDOR;ID_GRUPO_ARTICULO"
                                OnAfterPerformCallback="grdVendedor_AfterPerformCallback" OnRowUpdating="grdVendedor_RowUpdating"
                                Width="100%">
                                <TotalSummary>
                                    <dx:ASPxSummaryItem FieldName="CANT" DisplayFormat="{0:#,##0}" SummaryType="Sum" />
                                    <dx:ASPxSummaryItem DisplayFormat="{0:#,##0}" FieldName="IMP_META" 
                                        SummaryType="Sum" />
                                </TotalSummary>
                                <Columns>
                                    <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
                                        <EditButton Visible="True">
                                        </EditButton>
                                    </dx:GridViewCommandColumn>
                                    <dx:GridViewDataTextColumn Caption="Vendedor" FieldName="NOM_VENDEDOR"
                                        ShowInCustomizationForm="True" VisibleIndex="1">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="NRORUEDAS" ShowInCustomizationForm="True" VisibleIndex="2"
                                        Width="70px" Caption="Nro.ruedas">
                                        <EditFormSettings Visible="False" />
                                                                    
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Cantidad" FieldName="CANT" ShowInCustomizationForm="True"
                                        VisibleIndex="3" Width="100px">
                                          <PropertiesTextEdit DisplayFormatString="{0:N0}" DisplayFormatInEditMode="True">
                                <ValidationSettings ErrorText="Valor inválido">
                                    <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                </ValidationSettings>
                            </PropertiesTextEdit>
                                        <EditFormSettings Visible="True" CaptionLocation="Near" Caption="Cantidad:" />                                        
                                          <HeaderStyle HorizontalAlign="Center" />
                                          <CellStyle HorizontalAlign="Center">
                                          </CellStyle>
                                          <EditCellStyle Font-Size="7pt" >
                                          </EditCellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_VENDEDOR" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="5">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="MES" 
                                        ShowInCustomizationForm="True" Visible="False"
                                        VisibleIndex="6">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ANIO" 
                                        ShowInCustomizationForm="True" Visible="False"
                                        VisibleIndex="7">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_GRUPO_ARTICULO" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="8">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_UBIC_VEND_CAB" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="9">
                                        <EditFormSettings Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Des. grupo artículo" FieldName="NOM_ID_GRUPO_ARTICULO"
                                        ShowInCustomizationForm="True" VisibleIndex="2">
                                        <EditFormSettings Visible="False" />
                                        <EditCellStyle HorizontalAlign="Center">
                                        </EditCellStyle>
                                        <CellStyle HorizontalAlign="Center">
                                        </CellStyle>
                                        <EditFormSettings Visible="False" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <CellStyle HorizontalAlign="Center">
                                        </CellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Importe" FieldName="IMP_META" ShowInCustomizationForm="True"
                                        VisibleIndex="4" Width="100px">
                                        <EditFormSettings Visible="True" Caption="Importe:" CaptionLocation="Near" />
                                        <EditCellStyle Font-Size="7pt" HorizontalAlign="Center">
                                        </EditCellStyle>
                                         <PropertiesTextEdit DisplayFormatString="{0:#,##0}" DisplayFormatInEditMode="True">
                                <ValidationSettings ErrorText="Valor inválido">
                                    <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                </ValidationSettings>
                            </PropertiesTextEdit>
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" EnableRowHotTrack="True" />
                                <SettingsPager PageSize="20">
                                </SettingsPager>
                                <SettingsEditing EditFormColumnCount="4" Mode="PopupEditForm" PopupEditFormHorizontalAlign="Center"
                                    PopupEditFormModal="True" PopupEditFormVerticalAlign="WindowCenter" PopupEditFormWidth="200px" />
                                <Settings ShowFilterRow="True" ShowFooter="True" />
                                <SettingsText PopupEditFormCaption="Cantidad" />
                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanelOnStatusBar>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <ImagesFilterControl>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </ImagesFilterControl>
                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                    </Header>
                                    <LoadingPanel ImageSpacing="5px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesPager>
                                    <PageNumber ForeColor="#3E4846">
                                    </PageNumber>
                                    <Summary ForeColor="#1E395B">
                                    </Summary>
                                </StylesPager>
                                <StylesEditors ButtonEditCellSpacing="0">
                                    <ProgressBar Height="21px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dx:ASPxGridView>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>
                <br />
                <dx:ASPxRoundPanel ID="RPMetasOficina" runat="server" ClientInstanceName="RPMetasOficina"
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                    GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                    Width="70%" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px" 
                    ClientVisible="False">
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                    <HeaderStyle>
                        <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                    </HeaderStyle>
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent2" runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxGridView ID="grdOficina" runat="server" AutoGenerateColumns="False" ClientInstanceName="grdOficina"
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                KeyFieldName="ID_UBIC_VEND_CAB;ID_CANAL_DISTRIB;ID_OFI_VTA;ID_GRUPO_ARTICULO"
                                OnAfterPerformCallback="grdOficina_AfterPerformCallback" OnRowUpdating="grdOficina_RowUpdating"
                                Width="100%">
                                <TotalSummary>
                                    <dx:ASPxSummaryItem FieldName="CANT" DisplayFormat="{0:#,##0}" SummaryType="Sum" />
                                    <dx:ASPxSummaryItem DisplayFormat="{0:#,##0}" FieldName="IMP_META" 
                                        SummaryType="Sum" />
                                </TotalSummary>
                                <Columns>
                                    <dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
                                        <EditButton Visible="True">
                                        </EditButton>
                                    </dx:GridViewCommandColumn>
                                    <dx:GridViewDataTextColumn Caption="ID_OFI_VTA" FieldName="ID_OFI_VTA" ShowInCustomizationForm="True"
                                        VisibleIndex="7" Visible="False">
                                        <EditFormSettings Visible="False" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <CellStyle HorizontalAlign="Center">
                                        </CellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Nro.ruedas" FieldName="NroRuedas" ShowInCustomizationForm="True"
                                        VisibleIndex="3" Width="70px">
                                        <EditFormSettings Visible="False" />
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <CellStyle HorizontalAlign="Center">
                                        </CellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="CANT" ShowInCustomizationForm="True" VisibleIndex="4"
                                        Width="100px" Caption="Cantidad">
                                        <EditFormSettings Visible="True" CaptionLocation="Near" Caption="Cantidad :" />
                                        <PropertiesTextEdit DisplayFormatString="{0:N0}">
                                        </PropertiesTextEdit>                                  
                                        <EditCellStyle Font-Size="7pt" HorizontalAlign="Center">
                                        </EditCellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="MES" ShowInCustomizationForm="True" Visible="False"
                                        VisibleIndex="11">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ANIO" ShowInCustomizationForm="True" Visible="False"
                                        VisibleIndex="6">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_GRUPO_ARTICULO" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="8">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_UBIC_VEND_CAB" ShowInCustomizationForm="True"
                                        VisibleIndex="10" Visible="False">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="NOM_OFICINA" ShowInCustomizationForm="True"
                                        VisibleIndex="1" Caption="Oficina">
                                        <EditFormSettings CaptionLocation="None" Visible="False" />
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn FieldName="ID_CANAL_DISTRIB" ShowInCustomizationForm="True"
                                        Visible="False" VisibleIndex="9">
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Des. grupo artículo" FieldName="NOM_ID_GRUPO_ARTICULO"
                                        ShowInCustomizationForm="True" VisibleIndex="2">
                                        <EditFormSettings CaptionLocation="None" Visible="False" />
                                        <EditCellStyle HorizontalAlign="Center">
                                        </EditCellStyle>
                                        <CellStyle HorizontalAlign="Center">
                                        </CellStyle>
                                    </dx:GridViewDataTextColumn>
                                    <dx:GridViewDataTextColumn Caption="Importe" FieldName="IMP_META" 
                                        ShowInCustomizationForm="True" VisibleIndex="5" Width="100px">
                                             <PropertiesTextEdit DisplayFormatString="{0:#,##0}" DisplayFormatInEditMode="True">
                                <ValidationSettings ErrorText="Valor inválido">
                                    <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                </ValidationSettings>
                            </PropertiesTextEdit>
                                        <EditFormSettings CaptionLocation="Near" Visible="True" Caption="Importe :" />
                                          <EditCellStyle Font-Size="7pt" HorizontalAlign="Center">
                                          </EditCellStyle>
                                    </dx:GridViewDataTextColumn>
                                </Columns>
                                <SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True" EnableRowHotTrack="True" />
                                <SettingsPager PageSize="20">
                                </SettingsPager>
                                <SettingsEditing EditFormColumnCount="4" Mode="PopupEditForm" PopupEditFormHorizontalAlign="Center"
                                    PopupEditFormModal="True" PopupEditFormVerticalAlign="WindowCenter" PopupEditFormWidth="200px" />
                                <Settings ShowFilterRow="True" ShowFooter="True" />
                                <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                    <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanelOnStatusBar>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </Images>
                                <ImagesFilterControl>
                                    <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                    </LoadingPanel>
                                </ImagesFilterControl>
                                <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                    <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                    </Header>
                                    <LoadingPanel ImageSpacing="5px">
                                    </LoadingPanel>
                                </Styles>
                                <StylesPager>
                                    <PageNumber ForeColor="#3E4846">
                                    </PageNumber>
                                    <Summary ForeColor="#1E395B">
                                    </Summary>
                                </StylesPager>
                                <StylesEditors ButtonEditCellSpacing="0">
                                    <ProgressBar Height="21px">
                                    </ProgressBar>
                                </StylesEditors>
                            </dx:ASPxGridView>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxRoundPanel>
                <dx:ASPxPopupControl ID="popupvendedor" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                    CssPostfix="PlasticBlue" HeaderText="Nuevo Vendedor" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                    Width="400px" ClientInstanceName="popupvendedor" Modal="True" PopupHorizontalAlign="WindowCenter"
                    PopupVerticalAlign="WindowCenter">
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                    </ContentStyle>
                    <HeaderStyle>
                        <Paddings PaddingLeft="10px" PaddingBottom="4px" PaddingRight="4px" PaddingTop="4px" />
                    </HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" ClientInstanceName="ASPxRoundPanel1"
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Width="400px" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px">
                                <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                                <HeaderStyle>
                                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                                </HeaderStyle>
                                <PanelCollection>
                                    <dx:PanelContent ID="PanelContent3" runat="server" SupportsDisabledAttribute="True">
                                        <table>
                                            <tr>
                                                <td style="width: 250px">
                                                    Vendedor
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="cboVendedor" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                        <ButtonStyle Width="13px">
                                                        </ButtonStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 119px">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="justify" style="width: 119px">
                                                    Grupo árticulo:
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="cboGrupoArticulo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                        <ButtonStyle Width="13px">
                                                        </ButtonStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 119px">
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 119px">
                                                    <dx:ASPxLabel ID="lblCantidadV" runat="server" Text="Cantidad:">
                                                    </dx:ASPxLabel>
                                                </td>
                                                <td>
                                                    <dx:ASPxTextBox ID="txtCantidad" runat="server" onkeypress="return ValidNum(event);"
                                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="0" Width="170px">
                                                        <ClientSideEvents KeyPress="function(s, e) {
	return ValidNum(event);
}" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 119px">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 119px">
                                                    <dx:ASPxLabel ID="lblTipoMonedaV" runat="server" Text="Tipo moneda:">
                                                    </dx:ASPxLabel>
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="cboTipoMonedaV" runat="server" 
                                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                        CssPostfix="Office2010Blue" Spacing="0" 
                                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                        <ButtonStyle Width="13px">
                                                        </ButtonStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                        <table align="center">
                                            <tr>
                                                <td>
                                                    <dx:ASPxButton ID="btnAgregarVendedor" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" OnClick="btnAgregarVendedor_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                        Text="Agregar">
                                                        <ClientSideEvents Click="function(s, e) {
	popupvendedor.Hide();
}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PanelContent>
                                </PanelCollection>
                            </dx:ASPxRoundPanel>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
                <dx:ASPxPopupControl ID="popupOficina" runat="server" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                    CssPostfix="PlasticBlue" HeaderText="Nueva oficina" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                    Width="400px" ClientInstanceName="popupOficina" Modal="True" PopupHorizontalAlign="WindowCenter"
                    PopupVerticalAlign="WindowCenter">
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                    </ContentStyle>
                    <HeaderStyle>
                        <Paddings PaddingLeft="10px" PaddingBottom="4px" PaddingRight="4px" PaddingTop="4px" />
                    </HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">
                            <dx:ASPxRoundPanel ID="ASPxRoundPanel3" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" GroupBoxCaptionOffsetY="-19px" HeaderText="" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Width="400px" ClientInstanceName="ASPxRoundPanel3" EnableDefaultAppearance="False"
                                GroupBoxCaptionOffsetX="6px">
                                <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                                <HeaderStyle>
                                    <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                                </HeaderStyle>
                                <PanelCollection>
                                    <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                                        <table>
                                            <tr>
                                                <td style="width: 156px">
                                                    Oficina
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="cboOficina" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                        <ButtonStyle Width="13px">
                                                        </ButtonStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="justify" style="width: 156px">
                                                    Grupo árticulo:
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="cboGrupoArticuloOficina" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                        <ButtonStyle Width="13px">
                                                        </ButtonStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="justify" style="width: 156px">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    Canal distribución:
                                                </td>
                                                <td>
                                                    <dx:ASPxComboBox ID="CboCanalDistribrucion" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" IncrementalFilteringMode="Contains" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                        </LoadingPanelImage>
                                                        <LoadingPanelStyle ImageSpacing="5px">
                                                        </LoadingPanelStyle>
                                                    </dx:ASPxComboBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    &nbsp;
                                                </td>
                                                <td>
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    <dx:ASPxLabel ID="lblCantidadO" runat="server" Text="Cantidad:">
                                                    </dx:ASPxLabel>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtCantidadOficina" runat="server" onkeypress="return ValidNum(event);"
                                                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="0" Width="170px">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    &nbsp;<td>
                                                        &nbsp;</td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 156px">
                                                    <dx:ASPxLabel ID="lblTipoMonedaO" runat="server" Text="Tipo moneda:">
                                                    </dx:ASPxLabel>
                                                    <td>
                                                        <dx:ASPxComboBox ID="cboTipoMonedaO" runat="server" 
                                                            CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                                            CssPostfix="Office2010Blue" Spacing="0" 
                                                            SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                            <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                            </LoadingPanelImage>
                                                            <LoadingPanelStyle ImageSpacing="5px">
                                                            </LoadingPanelStyle>
                                                            <ButtonStyle Width="13px">
                                                            </ButtonStyle>
                                                        </dx:ASPxComboBox>
                                                    </td>
                                                </td>
                                            </tr>
                                        </table>
                                        <table align="center">
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <dx:ASPxButton ID="btnAgregarOficina" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" OnClick="btnAgregarOficina_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                        Text="Agregar">
                                                        <ClientSideEvents Click="function(s, e) {
	popupOficina.Hide();
}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PanelContent>
                                </PanelCollection>
                            </dx:ASPxRoundPanel>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
                <dx:ASPxPopupControl ID="popupmsj" runat="server" AllowDragging="True" ClientInstanceName="popupmsj"
                    CloseAction="None" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue"
                    EnableViewState="False" HeaderText="Mensaje" Modal="True" PopupHorizontalAlign="WindowCenter"
                    PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                    Width="300px">
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                    </ContentStyle>
                    <HeaderStyle>
                        <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" PaddingTop="4px" />
                        <Paddings PaddingLeft="7px"></Paddings>
                    </HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" SupportsDisabledAttribute="True">
                            <br />
                            <dx:ASPxPanel ID="ASPxPanel2" runat="server" DefaultButton="btCreate">
                                <PanelCollection>
                                    <dx:PanelContent ID="Panelpopup" runat="server">
                                        <table align="center">
                                            <tr>
                                                <td colspan="2">
                                                    <dx:ASPxLabel ID="lblmsj" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue">
                                                    </dx:ASPxLabel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                        <table align="center">
                                            <tr>
                                                <td align="center" style="width: 215px">
                                                    <dx:ASPxButton ID="ASPxButton1" runat="server" Text="Aceptar" AutoPostBack="False"
                                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                                        <ClientSideEvents Click="function(s, e) {
	popupmsj.Hide();
}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PanelContent>
                                </PanelCollection>
                            </dx:ASPxPanel>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
                <dx:ASPxPopupControl ID="PopupConfirmacion" runat="server" AllowDragging="True" ClientInstanceName="PopupConfirmacionVendedor"
                    CloseAction="CloseButton" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                    CssPostfix="PlasticBlue" EnableViewState="False" HeaderText="Mensaje" Modal="True"
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                    Width="300px">
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
                    </ContentStyle>
                    <HeaderStyle>
                        <Paddings PaddingLeft="10px" PaddingBottom="4px" PaddingRight="4px" PaddingTop="4px" />
                    </HeaderStyle>
                    <ContentCollection>
                        <dx:PopupControlContentControl ID="PopupControlContentControl6" runat="server" SupportsDisabledAttribute="True">
                            <br />
                            <dx:ASPxPanel ID="ASPxPanel6" runat="server" DefaultButton="btCreate">
                                <PanelCollection>
                                    <dx:PanelContent ID="PanelContent5" runat="server">
                                        <table>
                                            <tr>
                                                <td colspan="3">
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;¿Estas seguro de anular este registro
                                                    ?
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                </td>
                                                <td>
                                                    <dx:ASPxButton ID="btnPopAceptar" runat="server" AutoPostBack="False" ClientInstanceName="btnPopAceptar"
                                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                        OnClick="btnPopAceptar_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                        Text="Aceptar" Width="10px">
                                                        <ClientSideEvents Click="function(s, e) {
	PopupConfirmacionVendedor.Hide();
	e.processOnServer = true;
}" />
                                                    </dx:ASPxButton>
                                                </td>
                                                <td>
                                                    <dx:ASPxButton ID="btnPopCancelar" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                        Text="Cancelar" Width="10px">
                                                        <ClientSideEvents Click="function(s, e) {
	PopupConfirmacionVendedor.Hide();
}" />
                                                    </dx:ASPxButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </dx:PanelContent>
                                </PanelCollection>
                            </dx:ASPxPanel>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>
